Revert bad timezone fix in GPX.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 1 Jan 2003 02:25:19 +0000 (02:25 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 1 Jan 2003 02:25:19 +0000 (02:25 +0000)
gpsbabel/gpx.c

index 030b4afdb67f3e95db967de0ec709b7111853694..4ae86bbf5d69497d2fc25921ce4ee28e48dfc994 100644 (file)
@@ -371,10 +371,18 @@ gpx_end(void *data, const char *el)
                        tm.tm_year -= 1900;
                        tm.tm_isdst = 1;
                        wpt_tmp->creation_time = mktime(&tm);
+#if 0
                        /* mktime assumes local time, and Z is gmtime */
                        /* localtime will initialize timezone and daylight */
+                       /* 12/31/02 - RJL - unfortunately, this fix relies
+                        * on non-ANSI extensions, so I've turned this off
+                        * and reverted to the old way.
+                        */
                        localtime( &wpt_tmp->creation_time );
                        wpt_tmp->creation_time -= timezone - (daylight?3600:0);
+#else
+                        wpt_tmp->creation_time = mktime(&tm);
+#endif
                }
                if (in_wpt && in_gs_type && !in_gs_log) {
                        wpt_tmp->gc_data.type = gs_mktype(cdatastr);